<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>物流信息</title>
<style type="text/css">
    label{font-size: 12px;}
    .row{height: auto; line-height: 35px;}
    .uploader-blank{padding-top: 15px; width:158px;}
    .uploader-list{margin-bottom: 10px; position: relative;}
    .uploader-list img{height: 112px; width: 145px; border:#ccc 1px solid; padding: 5px;}

    #transdetail li{list-style: none; font-size: 14px; line-height: 35px; line-height: 25px; margin-bottom: 10px;
        border-bottom: #f8f8f8 1px solid;}
    #transdetail li p{font-size: 12px; color: #333;}
</style>
</head>
<body>
<div class="pd-20">
  <!-- <form action="" method="post" class="form form-horizontal" name="form1" id="form1"> -->
    <div class="row cl">

        <label class="form-label col-2 text-r">物流公司：</label>
        <div class="formControls col-6 s-msg" id="admin_shipping_name">
           
        </div>

    </div>

    <div class="row cl">
        <label class="form-label col-2 text-r">订单编号：</label>
        <div class="formControls col-6 s-msg" id="admin_shipping_num">
            
        </div>

    </div>
    
    <div class="row cl">
        <label class="form-label col-2 text-r">备注：</label>
        <div class="formControls col-8" id="remark">
            
        </div>

    </div>
    <div class="row cl">
        <label class="form-label col-2 text-r">物流信息：</label>
        <div class="formControls col-8" id="transdetail">
            加载中...
        </div>
        
    </div>
    <!-- <div class="row cl">
        <div class="col-9 col-offset-3">
            <input class="btn btn-primary radius" type="submit" id="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
        </div>
    </div> -->
    <!-- </form> -->
</div>
<script id="test" type="text/html">

</script>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 

<script type="text/javascript" src="lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script>
<script type="text/javascript" src="js/s.js"></script> 
<!-- <script type="text/javascript" src="js/template-native.js"></script>  -->
<script type="text/javascript">
$(function(){
    

    var oid=getUrlParam('oid');

    var k=getUrlParam('index');
console.log(k)
    
    if(oid!=null){
       $.getJSON(API_ORDERLIST+'?oid='+oid,function(data){
            if(!checkStatus(data)) return;//判断登录
            var admin_shipping_code=data.datas.shipping[k].shipping_code;
            var admin_shipping_num=data.datas.shipping[k].shipping_num;
            var admin_shipping_name=data.datas.shipping[k].shipping_name;
            // var admin_shipping_code=data.datas.admin_shipping_code;
            // var admin_shipping_num=data.datas.admin_shipping_num;
            // var admin_shipping_name=data.datas.admin_shipping_name;


            var remark=data.datas.remark;
            if(admin_shipping_code=="" || admin_shipping_num==""){
                layer.msg("参数缺失",{icon:5,time:1000});
                return;
            }
            $("#admin_shipping_name").html(admin_shipping_name);
            
            $("#admin_shipping_num").html(admin_shipping_num);
            $("#remark").html(remark);
            $.getJSON(API_EXPRESS,{
                express_code:admin_shipping_code,
                express_id:admin_shipping_num,
            },function(data){
                if(data.datas.Success){
                    if(data.datas.State=="0" && data.datas.Reason=="此单无物流信息"){
                         $("#transdetail").html("暂无物流信息");
                    }else{
                        var list=data.datas.Traces;
                        $("#transdetail").html("");
                        for(x in list){
                            $("#transdetail").append('<li>· '+list[x].AcceptStation+'<p>'+list[x].AcceptTime+'</p></li>');
                        }
                    }
                    
                    

                }else{

                    parent.parent.layer.msg("物流信息查询失败", {icon:3,time:1000});
                }
                
            })


       })
    }else{
        parent.parent.layer.msg("缺少参数", {icon:3,time:1000});
    }
    


    
});



</script>
</body>
</html>